-- GENERATED SPELL FOR [Heggin Stonewhisker] --


function spell0_5847(pUnit, Event) --@Fire Shot,n/a--
pUnit:FullCastSpellOnTarget(6979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5847', 567, 1)
end

function spell1_5847(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5847', 567, 1)
end

function Sorts_5847(pUnit, Event)
local choix_sorts_5847 = math.random(0, 1)
if choix_sorts_5847 == 0 then
pUnit:RegisterEvent('spell0_5847', 1, 1)
end
if choix_sorts_5847 == 1 then
pUnit:RegisterEvent('spell1_5847', 1, 1)
end
end

function mob5847_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5847', math.random(1500, 3000), 1)
end

function mob5847_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5847_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5847_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5847, 1, 'mob5847_Action')
RegisterUnitEvent(5847, 2, 'mob5847_Leave')
RegisterUnitEvent(5847, 3, 'mob5847_Kill')
RegisterUnitEvent(5847, 4, 'mob5847_Die')
